package com.haoyun.mirage.user.model.vo;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.haoyun.common.core.jackson.serializer.LongJsonDeserializer;
import com.haoyun.common.core.jackson.serializer.LongJsonSerializer;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;

/**
 * Created by twg on 2018/6/3.
 */
@Data
public class RoleVO implements Serializable {

    private static final long serialVersionUID = 7397191860179614597L;
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    private Long id;
    @NotBlank(message = "角色名称不能为空")
    private String roleName;
    @NotBlank(message = "角色code不能为空")
    private String roleCode;
    @NotBlank(message = "角色描述不能为空")
    private String roleDesc;
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    private Long deptId;
    private String deptName;
}
